/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navBar-t {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navBar-t .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4a90e2;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logged-in-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-link {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.profile-link:hover {
    background: #f0f0ff;
    color: #5568d3;
}

.welcome-text {
    color: #333;
    font-size: 0.95rem;
}

.welcome-text strong {
    color: #667eea;
}

.logout-btn {
    padding: 6px 14px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
}

.auth-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 移动端菜单图标 */
.mobile-menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    transition: transform 0.3s ease;
}

.mobile-menu-icon:hover {
    transform: scale(1.1);
}

.login {
    background-color: #fff;
    color: #4a90e2;
    border: 1px solid #4a90e2;
}

.login:hover {
    background-color: #f0f7ff;
}

.register {
    background-color: #4a90e2;
    color: #fff;
}

.register:hover {
    background-color: #357abd;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: bold;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* 功能特色 */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2c3e50;
    font-weight: bold;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* 题库分类 */
.categories {
    padding: 80px 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: all 0.5s ease;
    transform: rotate(45deg) translate(-100%, -100%);
}

.category-card:hover::before {
    transform: rotate(45deg) translate(100%, 100%);
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.category-card p {
    color: #555;
    margin-bottom: 15px;
}

.question-count {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 统计数据 */
.stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin: 0;
    opacity: 0.8;
}

/* 响应式设计 */

/* 平板和小屏幕 */
@media (max-width: 992px) {
    .hero {
        padding: 80px 0 50px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .features, .categories {
        padding: 60px 0;
    }
}

/* 移动端导航栏 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 15px;
    }
    
    .navBar-t {
        padding: 10px 0;
    }
    
    .navBar-t .container {
        flex-wrap: wrap;
    }
    
    .logo span {
        font-size: 1.2rem;
    }
    
    .logo img {
        height: 35px;
    }
    
    .nav-links {
        display: none; /* 在移动端隐藏导航链接 */
        flex-direction: column;
        width: 100%;
        gap: 10px;
        padding: 20px 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 10px;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    /* 移动端菜单图标 */
    .mobile-menu-icon {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        padding: 5px 10px;
        order: 3;
    }
    
    .auth-buttons {
        order: 2;
        gap: 8px;
    }
    
    .auth-buttons button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 15px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .features {
        padding: 50px 0;
    }
    
    .categories {
        padding: 50px 0;
    }
    
    .features-grid, .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card, .category-card {
        padding: 25px 20px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .category-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .feature-card h3, .category-card h3 {
        font-size: 1.3rem;
    }
    
    .feature-card p, .category-card p {
        font-size: 0.95rem;
    }
    
    .stats {
        padding: 50px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    .footer {
        padding: 25px 0;
        font-size: 0.9rem;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    .logo span {
        font-size: 1rem;
    }
    
    .logo img {
        height: 30px;
    }
    
    .hero {
        padding: 50px 0 30px;
    }
    
    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .btn-primary, .btn-secondary {
        max-width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .features, .categories {
        padding: 40px 0;
    }
    
    .features-grid, .categories-grid {
        gap: 15px;
    }
    
    .feature-card, .category-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 2.2rem;
    }
    
    .category-icon {
        font-size: 2.8rem;
    }
    
    .feature-card h3, .category-card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .feature-card p, .category-card p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .question-count {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    .stats {
        padding: 40px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .footer {
        padding: 20px 0;
        font-size: 0.85rem;
    }
}

/* 超小屏手机 */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .auth-buttons button {
        width: 100%;
        max-width: none;
    }
    
    .feature-card, .category-card {
        padding: 18px 12px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}
